package com.neuedu.web.controller;

import com.neuedu.web.common.BaseMethodController;
import com.neuedu.web.common.PageInfo;
import com.neuedu.web.po.UmsUser;
import com.neuedu.web.service.DeptService;
import com.neuedu.web.service.UserService;
import com.neuedu.web.vo.DeptVO;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @author 金山
 * 项目：his
 * site: https://blog.fulfill.com.cn
 * 描述  Dept接口
 * @data 2024-11-21 14:21:592
 */
@WebServlet(urlPatterns = "/dept/*")
public class DeptController extends BaseMethodController {

    private DeptService deptService = new DeptService();

    private PageInfo<DeptVO> page(HttpServletRequest request , HttpServletResponse response) throws IOException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return deptService.page(request,response);
    }


    /**
     * 添加部门
     * @param request
     * @param response
     * @return
     * @throws IOException
     */
    public boolean save(HttpServletRequest request ,HttpServletResponse response) throws IOException {
        return deptService.save(request,response);
    }


    /**
     * 删除
     * @param request
     * @param response
     * @return
     * @throws IOException
     */
    public boolean delete(HttpServletRequest request ,HttpServletResponse response) throws IOException {
        return deptService.delete(request,response);
    }
    public DeptVO getById(HttpServletRequest request ,HttpServletResponse response) throws IOException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return deptService.getById(request,response);
    }


}
